package entity;

import java.sql.Timestamp;

public class Review {

    private int reviewId;       // 评论ID
    private int productId;      // 商品ID
    private int userId;         // 用户ID
    private String reviewText;  // 评论内容
    private Timestamp reviewDate; // 评论日期

    // 默认构造函数
    public Review() {}

    // 带参数的构造函数
    public Review(int reviewId, int productId, int userId, String reviewText, Timestamp reviewDate) {
        this.reviewId = reviewId;
        this.productId = productId;
        this.userId = userId;
        this.reviewText = reviewText;
        this.reviewDate = reviewDate;
    }

    // Getter 和 Setter 方法

    public int getReviewId() {
        return reviewId;
    }

    public void setReviewId(int reviewId) {
        this.reviewId = reviewId;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getReviewText() {
        return reviewText;
    }

    public void setReviewText(String reviewText) {
        this.reviewText = reviewText;
    }

    public Timestamp getReviewDate() {
        return reviewDate;
    }

    public void setReviewDate(Timestamp reviewDate) {
        this.reviewDate = reviewDate;
    }

    // toString 方法，便于调试输出
//    @Override
//    public String toString() {
//        return "Review{" +
//                "reviewId=" + reviewId +
//                ", productId=" + productId +
//                ", userId=" + userId +
//                ", reviewText='" + reviewText + '\'' +
//                ", reviewDate=" + reviewDate +
//                '}';
//    }
}
